
<table style='width: 100%'>
<tr>

<td valign='top' width='25%' align="center">
<div class="content" style='height: 150px'>
<form action="../exec/kemikalije.php?action=new&type=proizvodjac" method="POST">
	<table class='tableResult'>
	<tr><th scope='col' class='spec'> Proizvođači </th></tr>
	<tr><td> <input type="text" name="proizvodjacNaziv" id="proizvodjacNaziv" placeholder="Proizvođač"></td></tr>
	<tr><td> <input type="text" name="proizvodjacLink" id="proizvodjacLink" placeholder="Link"></td></tr>
	<tr><th scope='col' class='spec'>
		<input type="submit" value='Dodaj'>
	</th></tr>
	</table>
</form>
</div>
</td>

<td valign='top' width='25%' align="center">
<div class="content" style='height: 150px'>
<form action="../exec/kemikalije.php?action=new&type=hazard" method="POST">
	<table class='tableResult'>
	<tr><th scope='col' class='spec' width='100px'> Hazard kodovi </th></tr>
	<tr><td> <input type="text" name="hazardNaziv" id="hazardNaziv" placeholder="Hazard kod"></td></tr>
	<tr><td> <input type="text" name="hazardLink" id="hazardLink" placeholder="Link"></td></tr>
	<tr><th scope='col' class='spec'>
		<input type="submit" value='Dodaj'>
	</th></tr>
	</table>
</form>
</div>
</td>

<td valign='top' width='25%' align="center">
<div class="content" style='height: 150px'>
<form action="../exec/kemikalije.php?action=new&type=odjel" method="POST">
	<table class='tableResult'>
	<tr><th scope='col' class='spec'> Odjeli </th></tr>
	<tr><td> <input type="text" name="odjelNaziv" id="odjelNaziv" placeholder="Odjel"></td></tr>
	<tr><th scope='col' class='spec'>
		<input type="submit" value='Dodaj'>
	</th></tr>
	</table>
</form>
</div>

</td>

<td valign='top' width='25%' align="center">
<div class="content" style='height: 150px'>
<form action="../exec/kemikalije.php?action=new&type=otapalo" method="POST">
	<table class='tableResult'>
	<tr><th scope='col' class='spec' width='100px'> Otapala </th></tr>
	<tr><td> <input type="text" name="otapaloNaziv" id="otapaloNaziv" placeholder="Otapalo"></td></tr>
	<tr><th scope='col' class='spec'>
		<input type="submit" value='Dodaj'>
	</th></tr>
	</table>
</form>
</div>

</td>

</tr>
<tr>

<td valign='top'>
<div class="content">
<table class='tableResult' width="100%">
<?php 
	$query = "SELECT * FROM proizvodjac;";
	$result = myQuery($query);
	
	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		if (strlen($row['naziv']) != 0)
		print("<tr><td align='center'> 
			<a href='" . $row['link'] . "'>" . 
			$row['naziv'] . "</td>
			<td width='16px'> <a title='Pobriši proizvođača' href='exec/kemikalije.php?action=delete&type=proizvodjac&id=" . $row['id'] . "'> 
					<img src='/images/delete.png' width='16px' height='16px'> </td>");
	}
?>
</table>
</div> <br>
</td>

<td valign='top'>
<div class="content">
<table class='tableResult' width="100%">
<?php 
	$query = "SELECT * FROM hazard;";
	$result = myQuery($query);
	
	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		if (strlen($row['naziv']) != 0)
		print("<tr><td align='center'> 
			<a href='" . $row['link'] . "'>" . 
			$row['naziv'] . "</td>
			<td width='16px'> <a title='Pobriši hazard kod' href='exec/kemikalije.php?action=delete&type=hazard&id=" . $row['id'] . "'> 
					<img src='/images/delete.png' width='16px' height='16px'> </td>");
	}
?>
</table>
</div> <br>
</td>

<td valign='top'>
<div class="content">
<table class='tableResult' width="100%">
<?php 
	$query = "SELECT * FROM odjel;";
	$result = myQuery($query);
	
	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		if (strlen($row['naziv']) != 0)
		print("<tr><td align='center'> " . $row['naziv'] . "</td>
		<td width='16px'> <a title='Pobriši odjel' href='exec/kemikalije.php?action=delete&type=odjel&id=" . $row['id'] . "'> 
					<img src='/images/delete.png' width='16px' height='16px'> </td>");
	}
?>
</table>
</div> <br>
</td>

<td valign='top'>
<div class="content">
<table class='tableResult' width="100%">
<?php 
	$query = "SELECT * FROM otapalo;";
	$result = myQuery($query);
	
	while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
		if (strlen($row['naziv']) != 0)
		print("<tr><td align='center'> " . $row['naziv'] . "</td>
		<td width='16px'> <a title='Pobriši otapalo' href='exec/kemikalije.php?action=delete&type=otapalo&id=" . $row['id'] . "'> 
					<img src='/images/delete.png' width='16px' height='16px'> </td>");
	}
?>
</table>
</div> <br>
</td>

</tr>
</table>
